package com.cqwu.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Resource entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "resource", catalog = "common")
public class Resource implements java.io.Serializable {

	// Fields

	private Integer id;
	private Integer courseId;
	private short oneLevelType;
	private short twoLevelType;
	private String resourceDesc;
	private String resourcePath;
	private String resourceName;
	private String fileName;
	private Integer uploaderId;
	private Integer uploadTime;
	private String keyword;
	private boolean isShow;

	// Constructors

	/** default constructor */
	public Resource() {
	}

	/** minimal constructor */
	public Resource(Integer courseId, short oneLevelType, short twoLevelType,
			String resourceDesc, String resourcePath, String resourceName,
			String fileName, Integer uploaderId, Integer uploadTime,
			String keyword) {
		this.courseId = courseId;
		this.oneLevelType = oneLevelType;
		this.twoLevelType = twoLevelType;
		this.resourceDesc = resourceDesc;
		this.resourcePath = resourcePath;
		this.resourceName = resourceName;
		this.fileName = fileName;
		this.uploaderId = uploaderId;
		this.uploadTime = uploadTime;
		this.keyword = keyword;
	}

	/** full constructor */
	public Resource(Integer courseId, short oneLevelType, short twoLevelType,
			String resourceDesc, String resourcePath, String resourceName,
			String fileName, Integer uploaderId, Integer uploadTime,
			String keyword, boolean isShow) {
		this.courseId = courseId;
		this.oneLevelType = oneLevelType;
		this.twoLevelType = twoLevelType;
		this.resourceDesc = resourceDesc;
		this.resourcePath = resourcePath;
		this.resourceName = resourceName;
		this.fileName = fileName;
		this.uploaderId = uploaderId;
		this.uploadTime = uploadTime;
		this.keyword = keyword;
		this.isShow = isShow;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "courseID", nullable = false)
	public Integer getCourseId() {
		return this.courseId;
	}

	public void setCourseId(Integer courseId) {
		this.courseId = courseId;
	}

	@Column(name = "oneLevelType", nullable = false)
	public short getOneLevelType() {
		return this.oneLevelType;
	}

	public void setOneLevelType(short oneLevelType) {
		this.oneLevelType = oneLevelType;
	}

	@Column(name = "twoLevelType", nullable = false)
	public short getTwoLevelType() {
		return this.twoLevelType;
	}

	public void setTwoLevelType(short twoLevelType) {
		this.twoLevelType = twoLevelType;
	}

	@Column(name = "resourceDesc", nullable = false, length = 65535)
	public String getResourceDesc() {
		return this.resourceDesc;
	}

	public void setResourceDesc(String resourceDesc) {
		this.resourceDesc = resourceDesc;
	}

	@Column(name = "resourcePath", nullable = false, length = 30)
	public String getResourcePath() {
		return this.resourcePath;
	}

	public void setResourcePath(String resourcePath) {
		this.resourcePath = resourcePath;
	}

	@Column(name = "resourceName", nullable = false, length = 30)
	public String getResourceName() {
		return this.resourceName;
	}

	public void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}

	@Column(name = "fileName", nullable = false, length = 30)
	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@Column(name = "uploaderID", nullable = false)
	public Integer getUploaderId() {
		return this.uploaderId;
	}

	public void setUploaderId(Integer uploaderId) {
		this.uploaderId = uploaderId;
	}

	@Column(name = "uploadTime", nullable = false)
	public Integer getUploadTime() {
		return this.uploadTime;
	}

	public void setUploadTime(Integer uploadTime) {
		this.uploadTime = uploadTime;
	}

	@Column(name = "keyword", nullable = false, length = 150)
	public String getKeyword() {
		return this.keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	@Column(name = "isShow")
	public boolean getIsShow() {
		return this.isShow;
	}

	public void setIsShow(boolean isShow) {
		this.isShow = isShow;
	}

}